aggregation HAVING keeps the matching groups